package jy.game.components.wuxue.box;


import jy.game.components.wuxue.JyBuff;
import jy.game.components.wuxue.SkillCoverType;
import jy.game.components.wuxue.SkillType0;
import jy.game.components.wuxue.pojo.JySpecialSkill;
import jy.game.tools.JyResourceManager;
import wx.xml.simpleframework.xml.Attribute;
import wx.xml.simpleframework.xml.Root;

@Root(name = "skill")
public class JySpecialSkillInstance extends JySkillBox {
    @Attribute public String name;

//    public JySpecialSkillInstance(String name, int equipped) {
//        this.name = name;
//        this.equipped = equipped;
//    }

    // (get) Token: 0x0600051A RID: 1306 RVA: 0x00004B58 File Offset: 0x00002D58
    public /*override*/ String Name() {
        {
            return this.name;
        }
    }


    // (get) Token: 0x0600051C RID: 1308 RVA: 0x00004B6D File Offset: 0x00002D6D
//        public /*override*/ Color Color(){ {
//                return new Color(0.337f, 0.584f, 1f);
//            }
//        }

    // (get) Token: 0x0600051B RID: 1307 RVA: 0x00004B60 File Offset: 0x00002D60
    public /*override*/ String Icon() {
        {
            return this.SpecialSkill().icon;
        }
    }

    // (get) Token: 0x0600051D RID: 1309 RVA: 0x00004B83 File Offset: 0x00002D83
    public /*override*/ int Cd() {
        {
            return this.SpecialSkill().coolDown;
        }
    }

    // (get) Token: 0x0600051E RID: 1310 RVA: 0x00004B90 File Offset: 0x00002D90
    public /*override*/ int Type() {
        {
            return -1;
        }
    }

    // (get) Token: 0x0600051F RID: 1311 RVA: 0x00004B93 File Offset: 0x00002D93
    public /*override*/ int CostMp() {
        {
            return this.SpecialSkill().costMp;
        }
    }

    // (get) Token: 0x06000520 RID: 1312 RVA: 0x00004BA0 File Offset: 0x00002DA0
    public /*override*/ int CostBall() {
        {
            return this.SpecialSkill().costBall;
        }
    }

    // (get) Token: 0x06000521 RID: 1313 RVA: 0x00004BAD File Offset: 0x00002DAD
    public /*override*/ int CastSize() {
        {
            return this.SpecialSkill().castSize;
        }
    }

    // (get) Token: 0x06000522 RID: 1314 RVA: 0x00004BBA File Offset: 0x00002DBA
    public /*override*/ int Size() {
        {
            return this.SpecialSkill().coverSize;
        }
    }

    // (get) Token: 0x06000523 RID: 1315 RVA: 0x00004BC7 File Offset: 0x00002DC7
    @Override public /*override*/ boolean hitSelf() {
        {
            return this.SpecialSkill().HitSelf();
        }
    }

    // (get) Token: 0x06000524 RID: 1316 RVA: 0x00004BD4 File Offset: 0x00002DD4
    public /*override*/ SkillCoverType CoverType() {
        {
            return (SkillCoverType.build(this.SpecialSkill().coverType));
        }
    }

    // (get) Token: 0x06000525 RID: 1317 RVA: 0x00004BE1 File Offset: 0x00002DE1
    public /*override*/ String Animation() {
        {
            return this.SpecialSkill().animation;
        }
    }

    // (get) Token: 0x06000526 RID: 1318 RVA: 0x00004BEE File Offset: 0x00002DEE
    public /*override*/ SkillType0 SkillType() {
        {
            return SkillType0.Special;
        }
    }

    // (get) Token: 0x06000527 RID: 1319 RVA: 0x00004BF1 File Offset: 0x00002DF1
    @Override public /*override*/ String audio() {
        {
            return this.SpecialSkill().audio;
        }
    }

    // (get) Token: 0x06000528 RID: 1320 RVA: 0x00004BFE File Offset: 0x00002DFE
    @Override public /*override*/ boolean isUsed() {
        {
            return super.isUsed();
        }
    }

    // (get) Token: 0x06000529 RID: 1321 RVA: 0x00032E80 File Offset: 0x00031080
    //[XmlIgnore]
    @Override protected /*override*/ String getDescriptionInRichtext(boolean forAchievement) {
        String str = "";
        str += this.SpecialSkill().info;
        str += "\n";
        str += String.format("<color='black'>覆盖类型 %s</color>\n", getSkillCoverTypeChinese());
        str += String.format("<color='black'>覆盖范围 %s</color>\n", this.size);
        str += String.format("<color='black'>施展范围 %s</color>\n", this.castSize);
        str += String.format("<color='cyan'>消耗内力 %s</color>\n", this.costMp);
        str += String.format("<color='yellow'>消耗怒气 %s</color>\n", this.CostBall);
        if (this.currentCd == 0) {
            str += String.format("<color='green'>技能CD %s/%s</color>\n", this.currentCd, this.Cd);
        } else {
            str += String.format("<color='red'>技能CD %s/%s</color>\n", this.currentCd, this.Cd);
        }
        return str + getBuffsString();

    }

    // (get) Token: 0x0600052A RID: 1322 RVA: 0x00004C06 File Offset: 0x00002E06
    // [XmlIgnore]
    @Override public /*override*/ Iterable<JyBuff> getBuffs() {
        {
            return this.SpecialSkill().getBuffs();
        }
    }

    // (get) Token: 0x0600052B RID: 1323 RVA: 0x00004C13 File Offset: 0x00002E13
    public JySpecialSkill SpecialSkill() {
        {
            return JyResourceManager.get(JySpecialSkill.class, this.name);
        }
    }
}
